package com.example.tests;


import com.example.fw.GroupObject;
import com.example.fw.Groups;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import org.testng.annotations.Test;

public class GroupRemovalTests extends TestBase {
	@Test
	public void testFirstGroupCanBeRemoved() throws Exception {
		Groups oldList = app.getGroupHelper().getGroups();
		GroupObject firstGroup = app.getGroupHelper().getFirstGroup();
		app.getGroupHelper().deleteGroup(0);
		Groups newList = app.getGroupHelper().getGroups();
		assertThat(newList,equalTo(oldList.withRemoved(firstGroup)));
	}
}